package com.groupbuying.orderproducer.dto;

import com.groupbuying.orderproducer.domain.OrderUshopDO;
import com.groupbuying.orderproducer.utils.DateUtils;

/**
 * 订单表时间格式化
 */
public class OrderUshopDTO extends OrderUshopDO{

    private String gmtCreateStr;
    private String gmtModifiedStr;
    private String closedTimeStr;

    public void setGmtModifiedStr(String gmtModifiedStr) {
        this.gmtModifiedStr = gmtModifiedStr;
    }

    public void setClosedTimeStr(String closedTimeStr) {
        this.closedTimeStr = closedTimeStr;
    }
    public void setGmtCreateStr(String gmtCreateStr) {
        this.gmtCreateStr = gmtCreateStr;
    }

    public String getGmtCreateStr() {
        return super.getGmtCreate() == null ? "" : DateUtils.format(super.getGmtCreate(), "yyyy-MM-dd HH:mm:ss");
    }
    public String getClosedTimeStr() {
        return super.getClosedTime() == null ? "" : DateUtils.format(super.getClosedTime(), "yyyy-MM-dd HH:mm:ss");
    }
    public String getGmtModifiedStr() {
        return super.getGmtModified() == null ? "" : DateUtils.format(super.getGmtModified(), "yyyy-MM-dd HH:mm:ss");
    }

}
